﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace LastfmNet.Models
{
    public class Ticket : LastfmModelBase
    {
        public Ticket()
        {
            this.Supplier = string.Empty;
            this.Url = string.Empty;
        }

        public Ticket(XmlNode ticketNode)
        : this()
        {
            if (ticketNode == null) return;
            this.InitializeFromXmlNode(ticketNode);
        }

        public override void InitializeFromXmlNode(XmlNode node)
        {
            if (node == null) return;
            this.Supplier = node.GetAttributeValue("supplier");
            this.Url = node.InnerText;
        }

        public string Supplier { get; set; }

        public string Url { get; set; }
    }
}
